The present invention relates to systems, computer program products, and methods for allocating memory for database management systems.
In typical database management system architectures, limited memory resources need to be allocated and shared by many different memory consumers. Efficient sharing of memory is particularly important in database architectures running on 32-bit data processing systems with a maximum addressable memory of 4 GB. Even on 64-bit data processing systems that may address a much larger memory space, given the cost of high performance random access memory and solid-state disks, memory may still be a limited system resource that needs to be allocated and shared.
By way of example, one of these memory consumers may be a lock memory associated with each database. This lock memory is also commonly known as a “lock heap” or “locklist”, and provides a memory pool for various database agents or processes for storing locks while processing various database transactions. For example, during processing of a query, a database agent may request locks to a number of records in a database table to prevent another agent from accessing and altering the records. As will be explained in detail further below, locklist memory resources must be carefully allocated in order to achieve functional or performance goals.
Traditionally, setting the amount of memory to be allocated to the locklist has been a manual task assigned to a database administrator. Typically, a database administrator would follow a trial-and-error method to approximate a memory allocation for the locklist, and work towards achieving desired functional goals and/or performance goals over time. However, trial-and-error memory tuning can be laborious and time-consuming, and as the database workload changes over time the memory allocation appropriate for the locklist may also change substantially, requiring the database administrator to frequently repeat the trial-and-errormethod for setting the allocation. Improved systems and methods for allocating lock memory are needed.